package ynh.bis.actions;
 
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import org.apache.log4j.*;

import ynh.bis.model.BoardDAO;
import ynh.bis.beans.BoardBean;
public class BoardViewAction extends Action {
	

	private static Logger log = Logger.getLogger(BoardAction.class);

	public ActionForward execute(ActionMapping mapping , ActionForm form , HttpServletRequest request , HttpServletResponse response) throws Exception{
		
		int id = Integer.parseInt(request.getParameter("id"));
		BoardDAO dao = new BoardDAO();
		Vector<BoardBean> board = dao.getBoardinfo(id);
		
		
		request.setAttribute("boardview", board);
		request.setAttribute("id",id);
		
		
		return mapping.findForward("success");
	}

}
